package com.example.demo.Server.Imp;

import com.example.demo.DAO.OperationDao;
import com.example.demo.Entity.Operation;
import com.example.demo.Server.operationServer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
@Primary
public class OperationServerImp implements operationServer {
    @Autowired
    private OperationDao dao;
    @Override
    public List<Operation> findAllOperation() {
        return dao.findAllOperation();
    }

    @Override
    public void AddOperation(Operation operation) {
        dao.AddOperation(operation);
    }

    @Override
    public Integer DeleteOperation(Operation operation) {
        return dao.DeleteOperation(operation);
    }
    @Override
    public Integer UpdateOperation(Operation operation) {
        return dao.UpdateOperation(operation);
    }

    @Override
    public List<Operation> QueryOperation(String query) {
        return dao.QueryOperation(query);
    }
}
